home *** CD-ROM | disk | FTP | other *** search
-
- #pragma once
-
-
- #define IfDebug(x, y) { if(x) DebugStr(y); }
- #define offsetField(type, field) ((long) &((type *) 0)->field)
- #undef nil
- #define nil 0
-
-
- typedef struct diskPictureRecord {
- long owners;
- PicHandle picture;
- CQDProcs procs;
- Rect bounds;
- PicHandle cachedPicture; /* if we have enough memory, this will be a purgable copy of the entire picture */
- Handle bufferRef; /* reference for the buffer for reading picture bytes from disk */
- char *bufferStart; /* pointer to the start of this buffer (only valid while picture is installed) */
- long bufferSize; /* size of this buffer (only valid while picture is installed) */
- char *bufferPtr; /* pointer to the next byte to read from this buffer (only valid while picture is installed) */
- short file;
- short padding; /* long align the following fields */
- CGrafPtr installedPort; /* this is the port that this disk picture is currently installed into */
- CQDProcsPtr savedProcs; /* this field is used to save the original value of the graf port’s saved proc pointer */
- } diskPictureRecord;
- typedef diskPictureRecord **diskPicture;
-
-
- typedef enum screenTypes {
- screen1Bit = 1,
- screen2Bit,
- screen4Bit,
- screen8Bit,
- screen16Bit,
- screen32Bit,
- screenColor = 0x100,
- screenMonoChrome = 0x200
- } screenTypes;
- typedef long screenType;
-
-
- typedef enum bufferTypes {
- bufferExactSize,
- bufferCanBeSmaller
- } bufferTypes;
- typedef long bufferType;
-
-
- #define disk_picture_already_installed -100000L
- #define disk_picture_not_installed -100001L
-
-
- void FindScreen(screenType type, short hSize, short vSize, Rect *bounds);
- void PostError(long error);
- void *GetBuffer(Handle *referencePtr, long *sizePtr, bufferType type);
-
- diskPicture NewDiskPicture(FSSpec *file);
- void DisposeDiskPicture(diskPicture target);
- diskPicture CloneDiskPicture(diskPicture source);
- void GetDiskPictureBounds(diskPicture source, Rect *bounds);
-
- void InstallDiskPicture(diskPicture source);
- void RemoveDiskPicture(diskPicture source);
-
- void DrawDiskPicture(diskPicture source);
- void GetDiskPictureInfo(diskPicture source, PictInfo *result, short verb, short requestedColors, short method);
-